Implement the `panic` profile option
authorAlex Crichton <alex@alexcrichton.com>
Fri, 13 May 2016 18:35:52 +0000 (11:35 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Fri, 20 May 2016 23:57:20 +0000 (16:57 -0700)
commit75848a2a6972a3de95dd8d0a52ff2cf0443adad7
tree2d5cb7e6f8f8744cd67707a84b0f4fe08653eb20
parent235e2c21b7807732fcc6294d2b79de92de142c77
Implement the `panic` profile option

This is the Cargo half of the implementation of [RFC 1513] which adds a new
`profile.*.panic` option to customize the `-C panic` argument to the compiler.
This is not passed by default and can otherwise be specified as `abort` or
`unwind` on the nightly compiler.

[RFC 1513]: https://github.com/rust-lang/rfcs/pull/1513

The `profile.*.panic` option is *only* used from the top-level crate, not each
crate individually. This means that applications should customize this value as
they see fit, and libraries will only use their own value when they're being
tested.

Cargo also has specific knowledge that when *testing* a crate it can't pass
`-C panic=abort` for now as the default test harness requires `panic=unwind`.
This essentially just means that `cargo test` will continue to work for crates
that specify `panic=abort` in Cargo.toml.
src/cargo/core/manifest.rs
src/cargo/ops/cargo_clean.rs
src/cargo/ops/cargo_compile.rs
src/cargo/ops/cargo_rustc/context.rs
src/cargo/ops/cargo_rustc/mod.rs
src/cargo/util/toml.rs
src/rustversion.txt
tests/test_cargo_compile.rs
tests/test_cargo_test.rs